Quick Start: Creating Folders with Ubuntu mkdir
This article introduces mkdir, the basic command for creating directories in Ubuntu. mkdir (short for make directory) creates empty directories and is essential for organizing files. Basic usage: create a single folder in the current directory with mkdir <folder-name> (e.g. mkdir projects). To create in a specified path (relative or absolute), specify the path directly (e.g. mkdir ~/Documents/notes or mkdir /tmp/temp_files). To create nested directories (e.g. a/b/c), plain mkdir fails because the parent does not exist; add the -p option (--parents) to create all parents automatically (e.g. mkdir -p workspace/code/python). Common issues: use -p when parents are missing; use sudo when permissions are insufficient (with caution). Summary: the core syntax is mkdir [options] path; plain mkdir creates one directory, -p handles nested directories, and sudo resolves permission issues.
Read More